package org.jacp.demo.ui;

import java.awt.Color;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.util.Map;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

import org.jacp.api.action.IAction;
import org.jacp.api.componentLayout.Layout;
import org.jacp.swing.rcp.component.ASwingComponent;

public class NavigationEditor extends ASwingComponent {
    private JPanel panel;

    @Override
    public void handleBarEntries(final Map<Layout, Container> arg0) {
	// TODO Auto-generated method stub

    }

    @Override
    public void handleMenuEntries(final Container arg0) {
	// TODO Auto-generated method stub

    }

    @Override
    public Container handleAction(final IAction<ActionEvent, Object> action) {
	if (panel == null) {
	    panel = new JPanel();
	    
	    panel.setBackground(new Color(0xd6dde5));
//	    panel.setBackground(Color.green);
	    panel.add(new JLabel("NavigationEditor"));
	}
	return panel;
    }

}
